<?php

namespace app\api\model\user;

use app\logic\model\user\UserEntityCartLogicModel;

class UserEntityCartApiModel extends UserEntityCartLogicModel
{
    public function checkExist(int $good_id,int $type,int $user_id)
    {
        return $this->where('goods_id',$good_id)
            ->where('type',$type)
            ->where('user_id',$user_id)
            ->find();
    }
    public function checkExistById(int $id,int $user_id)
    {
        return $this->where('id',$id)
            ->where('user_id',$user_id)
            ->find();
    }
}